<script>

    let obj={
        name:"zs",
        age:18,
        hobby:{
            ball:["乒乓球","羽毛球","台球"],
            eat:{
                eggs:["鸡蛋","鸭蛋"],
                fruit:["苹果","榴莲"]
            }
        }
    }
    
    let strobj=JSON.stringify(obj)
    console.log(strobj);

   let newobj= JSON.parse(strobj)
   console.log(newobj);

   newobj.sex="女"
   obj.hobby.ball.push("网球")
   console.log(obj);
   console.log(newobj);








</script>